import {post,get} from '@/tool/http.js'
let urlZone = '_server/v1.0/account.php'
let urlBase = '_server/v1.0/4399gamecase.php'
let APPID="1e33cb3583d9b951803f0aa832f4945b"
export default {    
    //登录
    avatarUrl:"http://wx.4399udc.com/_server/upload/4399gamecase/avatar",
    toLog(params){
        return post(urlZone+'?ac=login', {appid:APPID,...params})
    },
    //注册
    toReg(params){
        return post(urlZone+'?ac=register', {appid:APPID,...params})
    },
    //找回密码
    getPassword(params){
        return post(urlZone+'?ac=get_pwd', {appid:APPID,...params})
    },
    //修改密码
    upPassword(params){
        return post(urlZone+'?ac=update_pwd', {appid:APPID,...params}) 
    },
    //修改头像
    upAvatar(params){
        return post(urlZone+'?ac=update_avatar', {appid:APPID,...params}) 
    },
    //修改昵称
    upUserName(params){
        return post(urlZone+'?ac=update_username', {appid:APPID,...params})
    },
    // 获取推荐游戏
    getReco(params){
        return get(urlBase+'?ac=get_gamelist_by_recommendid', params)
    },
    // 获取游戏分类
    getGameType(params){
        return get(urlBase+'?ac=get_gametype', params)
    },
    //分类获取游戏列表
    getGameList(params){
        return get(urlBase+'?ac=get_gamelist_by_typeid', params)
    },
    //分类获取游戏信息
    getGameinfo(params){
        return get(urlBase+'?ac=get_gameinfo_by_id', params)
    },
    //收藏游戏
    favAdd(params){
        return post(urlBase+'?ac=add_collect', params)
    },
    //收藏游戏
    favDel(params){
        return post(urlBase+'?ac=delete_collect_by_gameid', params)
    },
    //收藏游戏列表
    favList(params){
        return get(urlBase+'?ac=get_my_collect_games', params)
    }

}


//http://192.168.54.245:90/index.php?s=/91&page_id=3169
//http://192.168.53.147/_admin